<html>
<head>
<title>Bob's Auto Parts- Order Results</title>
<meta name="robots" content="ALL" />
</head>
<body>
<h1>Bob's Auto Parts</h1>
<h2>Order Results</h2>
<?php
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
//create short variable names
$tireqty = $_POST['tireqty'];
$oilqty = $_POST['oilqty'];
$sparkqty = $_POST['sparkqty'];

$totalqty = 0;
$totalqty = $tireqty + $sparkqty + $oilqty;
if ($totalqty == 0) {
echo '<p style="color:red">';
echo 'You did not order anything on the previous page!';
echo '</p>';
}
echo '<p>Your Order is as follows: <br>' .$tireqty.' Tires <br>'.$oilqty.' Oil <br/>'.$sparkqty.' Spark';
//phpinfo();
$out = `ls -la`;
echo '<pre>'.$out.'</pre>';

echo "Total item ordered: ".$totalqty."<br>";
$totalamount = 0.00;

define('TIREPRICE', 100);
define('OILPRICE', 10);
define('SPARKPRICE', 4);

$totalamount = $tireqty * TIREPRICE
             + $oilqty * OILPRICE
             + $sparkqty * SPARKPRICE;

echo "Subtotal: $".number_format($totalamount,2)."<br />";
$taxrate = 0.10;//local sales tax
$totalamount = $totalamount * (1 + $taxrate);
echo "Total including tax: $".number_format($totalamount, 2)."<br />";

echo "<p>Orders Processed at  ";
echo date(' H:i, jS F Y');
echo "</p>";

?>
</body>
</html>

